<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    function useState(num) {
        let n = num;
        let fn = (k) => {
            n = k;
            alert(n);
        }
        return [n, fn];


    }

    let [num, setNum] = useState(100);

    setNum(88);


</script>

</html>